文档

StartSparkSQLEngine - 启动Spark SQL引擎

更新时间:

启动Spark SQL引擎。

接口说明

  • 地域的公网接入地址:adb.<region-id>.aliyuncs.com。示例:adb.cn-hangzhou.aliyuncs.com
  • 地域的 VPC 接入地址:adb-vpc.<region-id>.aliyuncs.com。示例:adb-vpc.cn-hangzhou.aliyuncs.com
说明 如果华北 1(青岛)、华南 1(深圳)、华南 3(广州)、中国香港发起请求时,遇到 409 错误,请联系技术支持。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
DBClusterIdstring

集群 ID。

amv-abcd****
ResourceGroupNamestring

资源组名称。

spark-rg-name
MinExecutorlong

执行 SQL 时拉起的最小 Exectuor 数量,配置为 0 意味着当不需要执行 SQL 时不会常驻 Exectuor。取值范围为 0 到 2000,当配置数量超过资源组承载总量时会导致服务启动失败。此处配置值必须小于 MaxExecutor 的配置值。

1
MaxExecutorlong

执行 SQL 时启动的最大的 Exector 数量。取值范围为 1 到 2000,当配置数量超过资源组承载总量时会导致服务启动失败。

10
Jarsstring

启动 SQL 引擎时需要引入的第三方 JAR 包列表,以逗号分隔的 JAR 包所在的 OSS 地址。

oss://testBuckname/test.jar,oss://testBuckname/test2.jar
SlotNumlong

最大槽位数,即最多可以维持多少个 Spark Session 来执行 SQL。取值范围为 1 到 500。

100
Configstring

启动 Spark SQL Engine 的具体配置,以一个 JSON 来描述 KEY-VALUE 型配置信息。详情请参见Spark Conf 配置

{ "spark.shuffle.timeout": ":0s" }

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求 ID。

D65A809F-34CE-4550-9BC1-0ED21ETG380
Dataobject

返回结果。

AppIdstring

Spark 作业 ID。

s202301xxxx
Statestring

Spark SQL Engine 状态:

  • SUBMITTED:提交启动请求。
  • STARTING:启动中。
  • RUNNING:运行中,可以执行 SQL。
  • FAILED:引擎出错退出。
SUBMITTED
AppNamestring

Spark App 名称。

SQLEngine1

示例

正常返回示例

JSON格式

{
  "RequestId": "D65A809F-34CE-4550-9BC1-0ED21ETG380",
  "Data": {
    "AppId": "s202301xxxx",
    "State": "SUBMITTED",
    "AppName": "SQLEngine1"
  }
}

错误码

HTTP status code错误码错误信息描述
400Spark.InvalidParameterInvalid parameter value: %s输入参数不正确。
400Spark.App.ExceedQuotaLimitationThe requested resource exceeds the maximum limit: %s提交Spark作业时申请资源量超过限制。
400Spark.App.InvalidAppTypeWhenSubmitThe specified AppType is INVALID or NULL. Please refer to the documentation to correct the parameters for %s.AppType类型不合法,请参考使用文档指定适合业务的AppType,请关注配置类型:%s。
400Spark.App.InvalidResourceSpecThe requested resource type is not supported:\n %s不支持申请的资源机型。
400Spark.App.ParameterConflictConflicting parameters submitted:\n %s提交Spark作业的配置参数存在冲突。
400Spark.App.ResourceNegativeErrorThe requested resource MUST be positive: %s申请使用的Spark使用的资源量必须为正整数。
400Spark.Config.InvalidAppFilePathThe main driver file MUST be a valid OSS path. Current is %s.主驱动文件地址必须是合法的OSS地址。
400Spark.Config.invalidConnectorsThe spark.adb.connectors configuration is invalid: %sspark.adb.connectors配置不正确。
400Spark.Config.InvalidDiskConfigThe requested disk mount parameter is invalid: %s磁盘挂载配置错误。
400Spark.Config.InvalidHostAliasConfigThe requested host alias parameter %s is invalid. Example: 127.0.0.1 localhost local域名映射配置错误。
400Spark.Config.InvalidLogOssPathThe OSS address for log storage is illegal: %s存储日志的OSS地址非法。
400Spark.Config.InvalidRoleArnFormatConfigure RoleARN %s invalid format. It should match acs:ram::uid_number:role/role_name配置的RoleARN格式错误。
400Spark.Config.InvalidTimeZoneUnable to parse time zone configuration %s : %s时区配置错误。
400Spark.Config.MainAppFileNotExistsThe main driver file is missing, [file] or [sqls] must be configured.主驱动文件缺失,必须保证file或者sqls配置不为空。
400Spark.Config.OSSPathAccessErrorThe configured OSS address %s cannot be accessed.配置的OSS路径无法访问。
400Spark.Config.OSSPathNotExistsThe OSS address %s requested does not exist or the permissions are insufficient.OSS路径不存在或当前用户无权限访问。
400Spark.Config.RoleArnVerifyFailedRoleARN parameter verification failed. Error msg: %s when verify RoleArn %sRoleARN参数校验失败。
400Spark.Config.SecurityGroupNotFoundThe security group in the configuration does not exist or cannot be accessed. %s.配置的资源组不存在或者因权限不足无法访问。
400Spark.Config.VswitchNotFoundThe vswitch in the configuration does not exist or cannot be accessed. %s.无法找到配置虚拟机交换机,或当前账号权限不足。
400Spark.InvalidStateThe object of the operation is in an invalid state: %s操作对象处于非合法状态。
400Spark.Log.InvalidStateFailed to obtain the logs of the Spark job %s in the %s state.无法获取指定Spark作业的日志。
403Spark.ForbiddenNo permissions to access the resources: %s权限不足,拒绝访问相关资源。您当前申请访问的信息是:%s。
404Spark.App.ContentNotFoundThe requested content %s of the Spark application is not found.找不到指定Spark作业的提交内容。
404Spark.App.NotFoundThe Spark application %s is not found.未能找到输入的 Spark App。
404Spark.ObjectNotFoundThe object is not found. More information: %s操作对象不存在。关联信息:%s。
500Spark.ServerErrorThe Spark control component system encountered an error, please create a ticket to solve the problem or concat the supported engineer on duty. Error message: %sSpark管控组件系统遇到错误,请提交工单,或联系值班工程师。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-07-27OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:403
    删除错误码:500
    新增错误码:404
2023-06-28OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    新增错误码:400
    新增错误码:403
    新增错误码:500
  • 本页导读 (1)
文档反馈